var id=localStorage.shopId;
console.log(id);
getShops(id);
function getShops(id) {
    $.get("http://localhost:8080/findShop",{id:id},function (res) {
        console.log(res);
        $("#list").html(baidu.template("storeTp",res));
    });
}
showGoods();
/*显示商品*/
function showGoods() {
    $.get("http://localhost:8080/src/data/shangpinlist1.json",{},function (res) {
        console.log(res);
        var obj={};
        obj.arr=res["product"];
        $("#shopList").html(baidu.template("tmp",obj));
    });
}
/*立即购买*/
function buyGoods(id) {
    $.post("http://localhost:8080/addCar",{
        id:id,
        count:1,
        isChoose:false
    },function (res) {
        console.log(res);
        window.open("car.html");
    });
}